﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Invoicing.sys
{
    public partial class RoleEdit : System.Web.UI.Page
    {

        private ZY.Model.Tab_RoleInfo _roleModel;
        private string _rolerights="";

        public string Rolerights
        {
            get { return _rolerights; }
            set { _rolerights = value; }
        }

        public ZY.Model.Tab_RoleInfo RoleModel
        {
            get { return _roleModel; }
            set { _roleModel = value; }
        }


        protected void Page_Load(object sender, EventArgs e)
        {
            ZY.BLL.Tab_RoleInfo dal = new ZY.BLL.Tab_RoleInfo();
           
            if (Request["reid"]!=null)
            {
                //获取角色对象
                RoleModel = dal.GetModel(int.Parse(Request["reid"].ToString()));

                ZY.BLL.Tab_RolePower rolepower = new ZY.BLL.Tab_RolePower();
                //获取权限对象
                List<ZY.Model.Tab_RolePower> rolepowerList = rolepower.GetModelList("rid=" + Request["reid"].ToString());
                if (rolepowerList.Count > 0)
                {
                    Rolerights = rolepowerList[0].rp_powerContext.ToString();

                }

            

                
            }

        }
    }
}